package design.a4_singleton;

/**
 * 双重锁校验
 */
public class Singleton_5 {

	private static Singleton_5 instance;

	private Singleton_5() {

	}

	private static Singleton_5 getInstance() {
		if (instance == null) {
			synchronized (Singleton_5.class) {
				if (instance == null) {
					instance = new Singleton_5();
					return instance;
				}
			}
		}
		return instance;
	}

}
